import 'package:flutter/material.dart';
import 'package:flutter_shop_template/pages/widgets/card/three.dart';

class HomeTabView3 extends StatefulWidget {
  const HomeTabView3({Key? key}) : super(key: key);

  @override
  _HomeTabView3State createState() => _HomeTabView3State();
}

class _HomeTabView3State extends State<HomeTabView3> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 20),
      child: GridView.count(
        crossAxisCount: 2,
        childAspectRatio: 0.75,
        mainAxisSpacing: 10,
        crossAxisSpacing: 5,
        children: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
            .map(
              (e) => CustomCard3(
                imageUrl: 'https://cdn.xihaf.com/template/a$e.jpg',
                title: '${(9 - e).abs() * 9 + 1}人观看',
              ),
            )
            .toList(),
      ),
    );
  }
}
